//strcmp函数的实现
#include <stdio.h>
#include <assert.h>
int  my_strcmp(const char* dest,const char* sor)
{
    assert(dest && sor);
    int ret = 0;
    while((ret=*(unsigned char*)dest-*(unsigned char*)sor)==0 && *dest)
    {
        ++dest;
        ++sor;
    }
    return ((-ret)<0)-(ret<0);//将值转化为1/0/-1
}


int main ()
{
    char arr1[20]="Hello";
    char arr2[]="Aorld";
    printf("%d\n",my_strcmp(arr1,arr2));
    return 0;
}